package com.shijiu.utils;

import com.shijiu.pojo.User;

import java.util.Map;
/**
 * @Author xlj
 * @Date Created in  2023/3/18 14:30
 * @DESCRIPTION:
 * @Version V1.0
 */
public class UserThreadLocal {

    private UserThreadLocal(){}
    //线程变量隔离
    private static final ThreadLocal<Map<String,Object>> LOCAL = new ThreadLocal<>();

    public static void put(Map map){
        LOCAL.set(map);
    }

    public static Map get(){
        return LOCAL.get();
    }

    public static void remove(){
        LOCAL.remove();
    }
}